﻿@using Webdiyer.WebControls.Mvc;
@model PagedList<Inspinia_MVC5.Models.Book>

@{
    ViewBag.Title = "借阅图书";
}

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>办理图书借阅</h2>
        <ol class="breadcrumb">
            <li class="active">
                <strong>借阅</strong>
            </li>
        </ol>
    </div>
</div>


<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">

                    <h5>可借阅图书</h5>
                    <div class="ibox-tools">
                        @*@Html.ActionLink("Create New", "Create", null, new { @class = "btn btn-primary btn-xs" })*@
                    </div>
                </div>
                <div class="ibox-content" style="overflow:hidden;">
                    @using (Ajax.BeginForm("Borrow", "Books", new AjaxOptions { UpdateTargetId = "articles" }, new { @class = "form-inline", style = "float:left;padding-left:40px;" }))
                    {
                        <div class="input-group">
                            <input type="text" name="name" placeholder="图书名称" id="exampleInputEmail2" class="form-control"> <span class="input-group-btn">
                                <button type="submit" class="btn btn-primary">
                                    检索
                                </button>
                            </span>
                        </div>
                    }
                    @using (Ajax.BeginForm("Borrow", "Books", new AjaxOptions { UpdateTargetId = "articles" }, new { @class = "form-inline", style = "float:left;padding-left:40px;" }))
                    {
                        <div class="input-group">
                            <input type="text"  name="isbn" placeholder="ISBN" id="exampleInputPassword2" class="form-control"> <span class="input-group-btn">
                                <button type="submit" class="btn btn-primary">
                                    检索
                                </button>
                            </span>
                        </div>
                    }
                    @*<form role="form" method="get" action="/Books/Borrow" class="form-inline" style="float:left">
                        <div class="form-group">
                            <label for="exampleInputEmail2" class="sr-only">图书名称</label>
                            <input type="text" name="name" placeholder="图书名称" id="exampleInputEmail2" class="form-control">
                        </div>
                        <button class="btn btn-white" type="submit">检索</button>
                    </form>
                    <form role="form" method="get" action="/Books/Borrow" class="form-inline" style="float:left;padding-left:40px;">
                        <div class="form-group">
                            <label for="exampleInputPassword2" class="sr-only">ISBN</label>
                            <input type="text" name="isbn" placeholder="ISBN" id="exampleInputPassword2" class="form-control">
                        </div>
                        <button class="btn btn-white" type="submit">检索</button>
                    </form>*@
                </div>
                @*<div class="ibox-content">
                    <div>
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>根据书名或ISBN模糊查询</h5>
                                <div class="ibox-tools">
                                    <a class="collapse-link">
                                        <i class="fa fa-chevron-up"></i>
                                    </a>
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                        <i class="fa fa-wrench"></i>
                                    </a>
                                    <ul class="dropdown-menu dropdown-user">
                                        <li>
                                            <a href="#">Config option 1</a>
                                        </li>
                                        <li>
                                            <a href="#">Config option 2</a>
                                        </li>
                                    </ul>
                                    <a class="close-link">
                                        <i class="fa fa-times"></i>
                                    </a>
                                </div>
                            </div>

                        </div>
                    </div>

                    

                </div>*@
                <div class="ibox-content" style="overflow:hidden;">
                    <div id="articles">
                        @Html.Partial("_BookList", Model)
                    </div>
                    @section scripts
{
                        @{Html.RegisterMvcPagerScriptResource();}
                <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
                    }
                </div>
            </div>
            </div>
    </div>
</div>



